﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GUI
{
    public static class Entitystatic
    {
        public static DateTime date;

        public static Entities.CaiDatKho ViewFile()
        {
            Entities.CaiDatKho giatri = new Entities.CaiDatKho();
            try
            {
                SetupConfig.Variable vl = new SetupConfig.Variable();
                vl.HanhDong = "1";
                //vl.HanhDong = "2";
                System.Reflection.Assembly getfile = System.Reflection.Assembly.GetExecutingAssembly();
                vl.FileName = getfile.Location + ".config";
                //vl.KeyName = "ChatService";
                SetupConfig.Variable[] list = SetupConfig.Config.GetConfig(vl);
                if (list[0].KeyValue == null || list[1].KeyValue == null)
                {
                    return new Entities.CaiDatKho("","");
                }
                giatri.MaKho = list[0].KeyValue;
                giatri.TenKho = list[1].KeyValue;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
            }
            return giatri;
        }
    }

}
